package com.jiandan.meizi;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ImageView;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.display.RoundedBitmapDisplayer;

public class ViewImgActivity extends Activity {

    private ImageView image;

    private DisplayImageOptions options;

    @Override
    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        setContentView(R.layout.view_img);

        init();
    }

    private void init() {

        image = (ImageView) findViewById(R.id.powerimage);

        String imgUrl = getIntent().getStringExtra("imgUrl");

        options = new DisplayImageOptions.Builder().showStubImage(R.drawable.ic_launcher)

        .showImageForEmptyUri(R.drawable.ic_empty)

        .showImageOnFail(R.drawable.ic_error)

        .displayer(new RoundedBitmapDisplayer(5)).build();

        ImageLoader.getInstance().displayImage(imgUrl, image, options);

    }



}
